import axios from '../AxiosConfig.js'

export const createParameter = (data) => {
    return axios({
        method: 'put',
        url: '/api/global-parameters/' + encodeURIComponent(data.name),
        data: data
    })
}
export const deleteParameter = (name) => {
    return axios({
        method: 'delete',
        url: '/api/global-parameters/' + encodeURIComponent(name)
    })
}

export const selectParameter = (name) => {
    return axios({
        method: 'get',
        url: '/api/global-parameters/' + encodeURIComponent(name)
    })
}

export const listParameter = () => {
    return axios({
        method: 'get',
        url: '/api/global-parameters'
    })
}